<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Incompatibilities</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mysqlnd.config.html">« 运行时配置</a></li>
      <li style="float: right;"><a href="mysqlnd.persist.html">Persistent Connections »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.mysqlnd.html">Mysqlnd</a></li>
    <li>Incompatibilities</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mysqlnd.incompatibilities" class="chapter">
 <h1>Incompatibilities</h1>

 <p class="para">
  MySQL Native Driver is in most cases compatible with MySQL Client Library
  (<code class="literal">libmysql</code>). This section documents incompatibilities
  between these libraries.
 </p>
 <ul class="itemizedlist">
  <li class="listitem">
   <p class="para">
    Values of <code class="literal">bit</code> data type are returned as binary strings
    (e.g. &quot;\0&quot; or &quot;\x1F&quot;) with <code class="literal">libmysql</code> and as decimal
    strings (e.g. &quot;0&quot; or &quot;31&quot;) with <code class="literal">mysqlnd</code>. If you want the
    code to be compatible with both libraries then always return bit fields as
    numbers from MySQL with a query like this:
    <code class="literal">SELECT bit + 0 FROM table</code>.
   </p>
  </li>
 </ul>
</div>
</div></div></body></html>